/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package gamaze;

/**
 *
 * @author pborrego
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        int w = 40;
        int h = 80;
        int generations = 250;

        MazeGen generator = new MazeGen(w, h);

        generator.dfsMaze();

        Maze m = new Maze(w, h, 0, 99, generator.getMaze());
        m.print();
        
//        Maze m = new Maze("./src/resources/default.maze");
//
//        m.print();
//
        GAMaze gam = new GAMaze(m);
        gam.populate();

//        System.out.println(gam.pop.toString());
        gam.run(generations);
//        System.out.println(gam.pop.toString());

        System.out.println("Best DNA after " + generations + " generation(s): " + gam.bestDNA());

        m.reset();
        m.validPath(gam.bestDNA());
        m.print();
    }

}
